//
//  ChooseCell.m
//  DebugDemo
//
//  Created by XFB on 2019/1/17.
//  Copyright © 2019年 ZhouCheng. All rights reserved.
//

#import "ChooseCell.h"
#import "ChooseModel.h"

@interface ChooseCell ()

@property (weak, nonatomic) IBOutlet UILabel *themeLabel;
@property (weak, nonatomic) IBOutlet UIImageView *checkImageView;

@end

@implementation ChooseCell

/// 单选方式1
- (void)setChooseModel:(ChooseModel *)chooseModel
{
    _chooseModel = chooseModel;
    self.checkImageView.hidden = !chooseModel.isSelected;
    self.themeLabel.text = chooseModel.theme;
}

/// 单选方式2
- (void)setChooseModel2:(ChooseModel *)chooseModel2
{
    _chooseModel2 = chooseModel2;
    self.themeLabel.text = chooseModel2.theme;
}

- (void)setIsSelected:(BOOL)isSelected
{
    _isSelected = isSelected;
    if (_isSelected) {
        self.checkImageView.hidden = NO;
    } else {
        self.checkImageView.hidden = YES;
    }
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
}

@end
